package com.cari.oa.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.validator.constraints.Length;

@Entity
@Table(name = "T_OPERATION_LOG")
public class OperationLogEntity implements Serializable{

	private static final long serialVersionUID = -4639161945307007713L;

	@Id
    @Length(max = 32)
    @GeneratedValue(generator = "system-uuid")
    @GenericGenerator(name = "system-uuid", strategy = "uuid")
    private String id;
	
	@NotNull(message = "标题不能为空")
    @Length(max = 100, message = "标题长度要小于100个字符")
    private String title;//标题
	
	@NotNull(message = "内容不能为空")
    private String content;//内容
	
	@NotNull(message = "创建时间不能为空")
    @Column(name = "CREATE_TIME")
    private Date createTime = new Date();//创建时间
	
	@NotNull(message = "运维时间不能为空")
    @Column(name = "DO_TIME")
    private Date doTime;//运维时间
	
	@NotNull(message = "运维结果不能为空")
	@Length(max = 200, message = "运维结果长度要小于200个字符")
    private String result;//运维结果
	
	@NotNull(message = "运维人员英文名不能为空")
    @Column(name = "OPERATION_USER_EN")
	@Length(max = 20, message = "运维人员英文名长度要小于20个字符")
    private String operationUserEn;//运维人员英文名
	
	@NotNull(message = "运维人员中文名不能为空")
    @Column(name = "OPERATION_USER_CN")
	@Length(max = 20, message = "运维人员中文名长度要小于20个字符")
    private String operationUserCn;//运维人员中文名

	@Column(name="END_TIME")
	private Date endTime;
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getDoTime() {
		return doTime;
	}

	public void setDoTime(Date doTime) {
		this.doTime = doTime;
	}

	public String getResult() {
		return result;
	}

	public void setResult(String result) {
		this.result = result;
	}

	public String getOperationUserEn() {
		return operationUserEn;
	}

	public void setOperationUserEn(String operationUserEn) {
		this.operationUserEn = operationUserEn;
	}

	public String getOperationUserCn() {
		return operationUserCn;
	}

	public void setOperationUserCn(String operationUserCn) {
		this.operationUserCn = operationUserCn;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}
}
